#include<stdio.h>
#include<assert.h>
char* my_strncpy(char*arr2,const char* arr1,int x) 
{
	assert(arr1&&arr2);
	char*pa=arr2;
	int n;
	for(n=0;n<x;++n)
	{
		*arr2++=*arr1++;
	}
	return pa;
}

int main()
{
	const char arr1[]="abcdefg";
	char arr2[100]="*********************";
	int x=3;
	char* ret=my_strncpy(arr2,arr1,x);
	printf("%s",ret);
	return 0;
 } 
